home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 24
/
Aminet 24 (1998)(GTI - Schatztruhe)[!][Apr 1998].iso
/
Aminet
/
util
/
arc
/
PPCxDMSWOS.lha
/
xdms.txt
< prev
Wrap
Text File
|
1998-02-17
|
14KB
|
312 lines
xDMS 1.0 Released in 17-Feb-98
Introduction:
-------------
Some time ago I started using UAE and Fellow Amiga emulators in the PC,
while still using my Amiga. Both emulators are very nice, and I started
testing some of my old games and demos on it. But a thing annoyed me. I
have a number of CDs with demos and other software, with hundreds of disk
images compressed with DMS. DMS was always the Amiga 'de facto' standard
for storing copies of non-dos disks, as used by most games and demos. But
the emulators required the Amiga software to be in uncompressed disk image
format (now known as .ADF) or disk images compressed with gzip (ADZ). To
use my DMS archives in the emulators I had to uncompress them with DMS
inside the emulation, saving it as an uncompressed disk image in the PC
hard disk. It was very boring, and also a waste of time and hard disk
space, since I could not let the files in the CDs. I thought a much better
solution would be to add direct support for DMS files in the emulators
itselves, in the same way as they support gzip compressed images. But as
DMS uses a proprietary format, I thought DMS support in the near future
would be unlikely. So I decided to do something myself and began to study
the inner workings of DMS. After some days of hard work, I wrote a
portable DMS unpacker, xDMS. xDMS is mainly intended for Amiga emulators
users, but can also be useful for actual Amiga users aswell. In fact, the
extract command of xDMS can be very useful to actual Amiga users, just need
an update of readdisk.
xDMS Features:
--------------
Supports decompression of files compressed using all known DMS
compression modes, including old and obsolete ones, and also encrypted
files, for 100% compatibility.
Can test DMS files integrity, view file informations and show attached
Banners and FILEID.DIZ .
Can generate standard disk images and compressed disk images, using gzip,
if you want to store your files in ADF or ADZ formats.
Can extract the files contained inside the DMS archives, if the
compressed disk is an AmigaDOS disk, using readdisk made by Bernd Schmidt.
Can process multiple files in batch with a single command, and also use
stdin and stdout for input and output of data.
Instalation:
------------
xDMS was written in ANSI C and should work with most ANSI C or C++
compilers and platforms with minor or no changes. It was tested under
Linux with GCC, MS-DOS with DJGPP and Amiga with SAS/C and worked well,
without warnings. To compile it with GCC or DJGPP you can just use make
with the supplied Makefile. For other compilers you may have to modify it
slightly. A smakefile for SAS/C is also supplied. After a successful
compilation you can install the generated executable somewhere in your
path. You also need to install gzip and readdisk if you want to be able to
create gzip compressed disk images and extract files from DMS. gzip is
available in most public domain software libraries. Readdisk is supplied
with UAE. You probably already have both. Also, as I'm sendind this
program to UAE and Fellow authors and allowing them (or anyone else) to
include it with their programs and change it in any way, perhaps xDMS just
came together with your emulator, and was installed with it and directly
supported. In this case you have nothing to worry.
Usage:
------
xDMS is a shell utility (yes, x is for extract, not XWindows). When
executed without arguments, it shows an usage screen. The template of xDMS
is the following:
xdms [options] <command> {<dms_file[.dms]> [+output]}
Arguments inside [] are optional. Arguments inside <> are required.
Arguments inside {} can be used one or several times.
A commmand is indicated by a letter and can be of of the following:
t : Test DMS archives
u : Unpack DMS archives to disk images
z : Unpack to disk images and compress it with gzip
x : Extract files inside DMS archives using readdisk
v : View DMS archives information
f : View full information
d : Show attached FILEID.DIZ
b : Show attached Banner
If the supplied input DMS file name doesn't have a .DMS or .dms
extension, a default .dms will be appended to it.
The output argument is optional and specifies a file name or a directory
for the unpacked files. If the output filename is not supplied, it is
generated from the input filename. If the generated file is a standard
disk image it will have the .adf extension. If it is a compressed image
the extension will be .adz . If you supply an output file name, no
extension will be added. By default, files are unpacked to the current
directory, unless you specify another directory with the output file name
our use the -d option.
Commands z and x respectively need gzip and readdisk instaled in the
current path, or it will fail.
When extracting files with x option, xDMS will call readdisk that will
reconstruct the tree of files and directories contained inside the DMS
compressed disk image, starting in a directory with the same name as the
volume name of the disk in the DMS file. This command can fail if xDMS
can't execute readdisk, or if the dms compressed disk is not an AmigaDOS
disk. The current version of readdisk supplied with UAE 0.69 only supports
old OFS Kickstart 1.x compatible disks, reporting any of the newer formats
introduced with AmigaOS 2.0 or newer as non-dos disks, while they actually
are.
The v commands show some information contained in DMS files, as the
version of DMS that created it, the type of the disk, date of creation,
number of tracks, etc. The f command shows additional tracks information.
The b command shows the banner, if the file contains one. A banner is a
text that is displayed when DMS unpacks a file and usually contains
informations about the group/BBS/person that made it.
The f command shows the FILEID.DIZ, if found in the DMS. It is a text
that identifies what the DMS file contains.
You can also supply as input filename stdin and/or +stdout as output. in
this case xDMS will read the data from the standard input and/or send it to
the standard output.
You can supply multiple input and optional output files and use wild
cards. All commands and options are not case sensitive.
You can also supply one or more (or none) of the following options:
-q : Quiet
-v : Verbose
-d <destdir> : Set destination directory
-p <password> : Decrypt encrypted archives using password
When more than one option is supplied they must be separated. You can't
use something like -qd dir .
The quiet option suppresses all messages usualy emited by xDMS, including
error messages. It is mostly to be used when xDMS is called from inside
emulators or some type of front-end. The program that calls xDMS can
verify if the operation was successful checking the return code of xDMS.
It will be 0 if the operation was successful or not 0 if it failed for one
or more files.
The verbose option makes xDMS display more messages than it usualy does,
including a progress indicator when unpacking files. This indicator is
only useful if you have a very slow computer.
The -d option specifies a global destination directory. This directory
name is added before the name of any output file or output directory
supplied with +output in the command line.
The -p option uses a password to decrypt the dms files if they are
encrypted. DMS uses a very lame encryption algorithm that could be easyly
cracked. In fact, if the file is encrypted, and contains a banner, you can
unpack it with any password.
Some examples:
xdms u foo.dms
This will unpack the file foo.dms in the current directory and save it as
foo.adf, also in the current directory.
xdms -v -d /tmp/tst u foo +bar.dsk
This will unpack the file foo.dms in the current directory and save it as
/tmp/tst/bar.dsk . Aditional messages and a prog